#ifndef TIMEMANAGER_H
#define TIMEMANAGER_H

#include <QObject>
#include <QTimer>

class TimeManager : public QObject
{
    Q_OBJECT
public:
    explicit TimeManager(QObject *parent = nullptr);
    bool isTime() const;

signals:
    void timeChange();

private slots:
    void updateTime();

private:
    QTimer *m_timer; //管理定时
    int m_time; //记录时间
    const int DAY_LENGTH = 10;
    const int NIGHT_LENGTH = 10;
};

#endif // TIMEMANAGER_H
